package com.zs.backend.common.enumeration;

import java.util.Objects;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 订单状态（0：未打款;1：已打款，）
 */
@Getter
@AllArgsConstructor
public enum OrderStatus {

    NO_PAY(0, "未打款"),
    HAVE_PAY(1, "已打款"),
    ;

    private Integer code;
    private String desc;

    public static OrderStatus valueOf(Integer value) {
        for (OrderStatus orderStatus : values()) {
            if (Objects.equals(orderStatus.code, value)) {
                return orderStatus;
            }
        }
        return null;
    }
}
